package com.le.tester.book.concurrentchallenge.executorSelf;

import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/**
 * createTime：2025-03-31 10:00
 * description：
 */
public interface Future<V> {
    boolean cancel(boolean mayInterruptRunning);

    boolean isCanceled();

    boolean isDone();

    V get() throws InterruptedException, ExecutionException, CancellationException;

    V get(long timeout, TimeUnit timeUnit) throws InterruptedException, ExecutionException, CancellationException, TimeoutException;

}
